home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-08-10 | 5.1 KB | 151 lines | [TEXT/MPS ] |
- (*
- File: AppleScript.mod
-
- Contains: AppleScript Specific Interfaces.
-
- Version: Technology: AppleScript 1.1
- Package: Universal Interfaces 2.0 in “MPW Latest” on ETO #17
-
- Copyright: © 1984-1995 by Apple Computer, Inc.
- All rights reserved.
-
- Bugs?: If you find a problem with this file, use the Apple Bug Reporter
- stack. Include the file and version information (from above)
- in the problem description and send to:
- Internet: apple.bugs.applelink.apple.com
- AppleLink: APPLE.BUGS
-
- *)
-
- (*$TAGS-*)
- (*$CALLING PASCAL*)
- MODULE AppleScript;
-
- IMPORT SYSTEM, AppleEvents, Components, OSA, TextEdit;
-
- (* $PUSH*)
- (* $ALIGN MAC68K*)
- (* $LibExport+*)
-
- CONST
- typeAppleScript* = LONG("ascr");
- kAppleScriptSubtype* = typeAppleScript;
- typeASStorage* = typeAppleScript;
-
- (**************************************************************************
- Components.Component Selectors
- **************************************************************************)
- kASSelectInit* = $1001;
- kASSelectSetSourceStyles* = $1002;
- kASSelectGetSourceStyles* = $1003;
- kASSelectGetSourceStyleNames* = $1004;
-
- (**************************************************************************
- OSAGetScriptInfo Selectors
- **************************************************************************)
- kASHasOpenHandler* = LONG("hsod");
-
- (*
- This selector is used to query a context as to whether it contains
- a handler for the kAEOpenDocuments event. This allows "applets" to be
- distinguished from "droplets." OSAGetScriptInfo returns false if
- there is no kAEOpenDocuments handler, and returns the error value
- errOSAInvalidAccess if the input is not a context.
- *)
- (**************************************************************************
- Initialization
- **************************************************************************)
-
- PROCEDURE ASInit*(scriptingComponent: Components.ComponentInstance; modeFlags: LONGINT; minStackSize: LONGINT; preferredStackSize: LONGINT; maxStackSize: LONGINT; minHeapSize: LONGINT; preferredHeapSize: LONGINT; maxHeapSize: LONGINT): OSA.OSAError;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $2F3C, $1C, $1001, $7000, $A82A;
- (*$END*)
- (*
- ComponentCallNow(kASSelectInit, 28);
- This call can be used to explicitly initialize AppleScript. If it is
- not called, the a scripting size resource is looked for and used. If
- there is no scripting size resource, then the constants listed below
- are used. If at any stage (the init call, the size resource, the
- defaults) any of these parameters are zero, then parameters from the
- next stage are used. ModeFlags are not currently used.
- Errors:
- errOSASystemError initialization failed
- *)
- (*
- These values will be used if ASInit is not called explicitly, or if any
- of ASInit's parameters are zero:
- *)
-
- CONST
- kASDefaultMinStackSize* = 4 * 1024;
- kASDefaultPreferredStackSize* = 16 * 1024;
- kASDefaultMaxStackSize* = 16 * 1024;
- kASDefaultMinHeapSize* = 4 * 1024;
- kASDefaultPreferredHeapSize* = 16 * 1024;
- kASDefaultMaxHeapSize* = 32 * 1024 * 1024;
-
- (**************************************************************************
- Source Styles
- **************************************************************************)
-
- PROCEDURE ASSetSourceStyles*(scriptingComponent: Components.ComponentInstance; sourceStyles: TextEdit.STHandle): OSA.OSAError;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $2F3C, $4, $1002, $7000, $A82A;
- (*$END*)
- (*
- ComponentCallNow(kASSelectSetSourceStyles, 4);
- Errors:
- errOSASystemError operation failed
- *)
- PROCEDURE ASGetSourceStyles*(scriptingComponent: Components.ComponentInstance; VAR resultingSourceStyles: TextEdit.STHandle): OSA.OSAError;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $2F3C, $4, $1003, $7000, $A82A;
- (*$END*)
- (*
- ComponentCallNow(kASSelectGetSourceStyles, 4);
- Errors:
- errOSASystemError operation failed
- *)
- PROCEDURE ASGetSourceStyleNames*(scriptingComponent: Components.ComponentInstance; modeFlags: LONGINT; VAR resultingSourceStyleNamesList: AppleEvents.AEDescList): OSA.OSAError;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $2F3C, $8, $1004, $7000, $A82A;
- (*$END*)
- (*
- ComponentCallNow(kASSelectGetSourceStyleNames, 8);
- This call returns an AEList of styled text descriptors the names of the
- source styles in the current dialect. The order of the names corresponds
- to the order of the source style constants, below. The style of each
- name is the same as the styles returned by ASGetSourceStyles.
-
- Errors:
- errOSASystemError operation failed
- *)
- (*
- Elements of TextEdit.STHandle correspond to following categories of tokens, and
- accessed through following index constants:
- *)
-
- CONST
- kASSourceStyleUncompiledText* = 0;
- kASSourceStyleNormalText* = 1;
- kASSourceStyleLanguageKeyword* = 2;
- kASSourceStyleApplicationKeyword* = 3;
- kASSourceStyleComment* = 4;
- kASSourceStyleLiteral* = 5;
- kASSourceStyleUserSymbol* = 6;
- kASSourceStyleObjectSpecifier* = 7;
- kASNumberOfSourceStyles* = 8;
-
- (* Gestalt selectors for AppleScript *)
- gestaltAppleScriptAttr* = LONG("ascr");
- gestaltAppleScriptVersion* = LONG("ascv");
-
- gestaltAppleScriptPresent* = 0;
- gestaltAppleScriptPowerPCSupport* = 1;
-
-
- (* $ALIGN RESET*)
- (* $POP*)
-
- END AppleScript.
-